const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  // 用户名
  username: state => state.user.userInfo.username,
  // 用户头像
  staffPhoto: state => state.user.userInfo.staffPhoto
  /*
    上面的写法本质上就是以下写法的简写
    username (state) {
      return state.user.userInfo.username
    }
  */
}
export default getters
